package org.example.test_03.Controller;

import org.example.test_03.Domian.ReturnData;
import org.example.test_03.Domian.User;
import org.example.test_03.Service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 用户有关的接口，登录
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    UserService userService;
    @PostMapping("/login")
    public ReturnData login(@RequestBody User user){
        return userService.login(user);
    }
}
